<template>
    <div class="schoolBg">
        <h2>学校名称：{{name}}</h2>
        <h2>学校地址：{{address}}</h2>
        <button @click="showName">点我</button>

    </div>
</template>

<script>
export default {
    name:'Student',
    data() {
        return {
            name:'清华大学',
            address:'北京清华园'
        }
    },
    methods:{
        showName() {
            alert(this.name)
        }
    }
}
</script>
<style>
.schoolBg {
    background-color: aqua;
}
</style>